package com.zjy.software.javabase;

import com.zjy.software.utils.*;



public class Main {
    public static void main(String[] args) {
        //通过类来创建一个对象
        //语法格式:  类名 对象名= new 类名();
        Person zhangSan=new Person();

        //调用对象的属性  变量名后面.soutv
        System.out.println("zhangSan.name = " + zhangSan.getName());

        //设置对象的属性
        zhangSan.setAge(-10);
        System.out.println("zhangSan.age = " + zhangSan.getAge());

        //调用对象的方法  语法: 对象.方法名([参数]);
        zhangSan.eat();

        zhangSan.setAge(33);
        System.out.println("zhangSan.age = " + zhangSan.getAge());

        Person liSi=new Person("李四");
        liSi.setAge(44);

        System.out.println("liSi.age = " + liSi.getAge());
        System.out.println("liSi.getName() = " + liSi.getName());

        com.zjy.software.utils.P.p("=============================================");
        Prints.print("hello world!");
        P.write("  我是write的P hello world!");

        Person wangWu=new Person("王五");
        System.out.println("wangWu.getName() = " + wangWu.getName());
        System.out.println("liSi.getName() = " + liSi.getName());
        System.out.println("zhangSan.getName() = " + zhangSan.getName());

        Person zhangSan2=new Person("张三",33);
        liSi.setName("李四");

        System.out.println("wangWu.getName() = " + wangWu.getName());
        System.out.println("liSi.getName() = " + liSi.getName());
        System.out.println("zhangSan.getName() = " + zhangSan.getName());

    }
}
